function mudatopico(valor,formsub)
{
<?php
    $diretorios = array(
        0 => "programming",
        1 => "graphics",
        2 => "elementary",
        3 => "fileio",
        4 => "functions",
        5 => "strings",
        6 => "gui",
        7 => "utilities",
        8 => "linear",
        9 => "polynomials",
        10 => "control",
        11 => "robust",
        12 => "nonlinear",
        13 => "signal",
        14 => "arma",
        15 => "metanet",
        16 => "scicos",
        17 => "sound",
        18 => "translation",
        19 => "tdcs",
        20 => "statistics",
        21 => "dcd",
        22 => "identification",
        23 => "mtlb",
        24 => "sparse",
        25 => "pvm",
        26 => "tksci",
        27 => "java"
    );
    $basedir = "../ajuda/scilab/eng/";
?>
    tamanho=formsub.length;
    for (i=tamanho-1; i >= 0; i--)
    {
        formsub[i]=null;
    }
<?php
    for ($j = 0; $j < 28; $j++)
    {
?>
    if (valor.selectedIndex == <?php echo $j ?>)
    {
<?php
    $i = 0;
    if ($handle = opendir($basedir.$diretorios[$j])) {
        while (false !== ($file = readdir($handle)))
            if (!is_dir($file) && $file != "whatis.htm" && substr($file,-4) == ".htm")
                echo "        formsub[".($i++)."] = new Option(\"".substr($file,0,-4)."\",\"$file\");\r\n";
        closedir($handle);
    }
?>
    }
<?php
    }
?>
}